import { useStore } from "./store";
import { useEffect } from "react";
function App() {
  const { channelList, fetchChannelList } = useStore();
  const { count, increment } = useStore();
  useEffect(() => {
    fetchChannelList();
  }, [fetchChannelList]);
  return (
    <div className="App">
      hello zustand!
      <button onClick={increment}>{count}</button>
      <ul>
        {channelList.map((item) => (
          <li key={item.id}>{item.name}</li>
        ))}
      </ul>
    </div>
  );
}

export default App;
